package com.yllt4cloud.shangmi.biz.control;

import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.RestController;

/**
 * @description:
 * @author: yaoxj
 * @create: 2020-01-21 15:19
 **/
@RestController
@AllArgsConstructor
public class TaiPiaoFangAnAct {

  /*  @RequestMapping(value = "/taiPiaoFangAn/list")
    public ResultResp<ListTaiPiaoFangAnResult> list(@RequestJsonParam("data") TaiPiaoFangAnPageParam param) {
        ListTaiPiaoFangAnResult result = new ListTaiPiaoFangAnResult();
        TaiPiaoFangAnJoinShanMiQueryParam queryParam = JsonUtil.objectToObjectByJson(param, TaiPiaoFangAnJoinShanMiQueryParam.class);
//        queryParam.setSortBy("t1.UpdateTime desc");

        Page<TaiPiaoFangAnJoinShangMiQueryResult> page = new Page<>();
        page.setPageNo(param.getPageNo());
        page.setPageSize(param.getPageSize());
        taiPiaoFangAnService.leftJoinShanMiQuery(queryParam, page);

        List<TaiPiaoFangAnJoinShangMiQueryResult> queryResult = page.getResult();
        for (TaiPiaoFangAnJoinShangMiQueryResult result2 : queryResult) {
            result2.setMianTaiFeiQuYuListStr(roomRegionUtil.getRegionStrList(result2.getMianTaiFeiQuYuList()));
            List<Integer> huaDanTypes = result2.getMianTaiFeiHuaDanLeiXingList();
            List<String> huaDanTypeNames = new ArrayList<>();
            for (Integer type : huaDanTypes) {
                DataDict typeDict = huaDanFangAnService.getHuaDanLeiXingDataDict(type);
                if (typeDict != null)
                    huaDanTypeNames.add(typeDict.getName());
            }
            result2.setMianTaiFeiHuaDanLeiXingListStr(huaDanTypeNames);
        }
        result.setPageNo(page.getPageNo());
        result.setPageSize(page.getPageSize());
        result.setResult(page.getResult());
        result.setTotalCount(page.getTotalCount());
        return ResultResp.success(result);
    }*/
}
